#ifndef __OSK_COMMANDS
#define __OSK_COMMANDS

                                          //  WParam                LParam         Result
//Send key to last focused window
#define MSG_OSK_SENDKEY   (WM_USER+100)   //  VirtKey (VK_xx)       -              -

//Repaint contents
#define MSG_OSK_REFRESH   (WM_USER+101)   //  -                     -              -

//Notify layout changed
#define MSG_OSK_LAYOUT    (WM_USER+102)   //  HWND                  HKL            -

//Get CFG option
#define MSG_OSK_GETOPT    (WM_USER+103)   //  CONSTSTR Name         int Default    int Option

//Execute key
#define MSG_OSK_EXECUTE   (WM_USER+104)   //  OSKCustomKey key                     -

//Activate OSK window
#define MSG_OSK_ACTIVATE  (WM_USER+105)   //  int OSK_ACTIVATE_xx                  -

#define MSG_OSK_LASTUSED  (WM_USER+110)

//MSG_OSK_ACTIVATE activation flags
#define OSK_ACTIVATE_HIDE    0x0000
#define OSK_ACTIVATE_ACTIVE  0x0001
#define OSK_ACTIVATE_SWITCH  0x1000

//Shift states
#define OSK_LSHIFT         0x0001
#define OSK_RSHIFT         0x0002
#define OSK_SHIFT          (OSK_LSHIFT|OSK_RSHIFT)
#define OSK_LMENU          0x0004
#define OSK_RMENU          0x0008
#define OSK_MENU           (OSK_LMENU|OSK_RMENU)
#define OSK_LCONTROL       0x0010
#define OSK_RCONTROL       0x0020
#define OSK_CONTROL        (OSK_LCONTROL|OSK_RCONTROL)
#define OSK_LWIN           0x0040
#define OSK_RWIN           0x0080
#define OSK_WIN            (OSK_LWIN|OSK_RWIN)
#define OSK_CAPITAL        0x0100
#define OSK_NUMLOCK        0x0200
#define OSK_SCROLL         0x0400

#define VK_WIN VK_APPS

#define OSK_ISKEY( k, sh ) ((k&sh)!=0)

//Keyboard layout name
typedef char LayoutName[ KL_NAMELENGTH+1 ];
//Keyboard state
typedef BYTE KeybState[ 256 ];

//Keyboard
DWORD       GetShiftState( LPCBYTE state );
void        SetShiftState( LPBYTE state, DWORD sh ); //modify buffer
BOOL        IsShiftKey( int key );
CONSTSTR    HKLToMiniStr( HKL layout );

#endif